nanopyx.core.analysis.ccm
Function used to generate a cross correlation matrix of an image stack. Cross correlation is calculated using either the first image of the stack or the previous image. Cross correlation values are normalized by the minimum and maximum Pearson's correlation between the two images.
Parameters
- img_stack: numpy array with shape (t, y, x)
- ref: either 0 or 1, 0 is used to calculate the ccm based on the first frame, 1 used to calculate based on the previous frame
Returns
numpy array with shape (t, y, x), corresponding to the cross correlation matrix
Function used to generate a cross correlation matrix of an image stack. Cross correlation is calculated using a static image frame. Cross correlation values are normalized by the minimum and maximum Pearson's correlation between the two images.
Parameters
- img_stack: numpy array with shape (t, y, x)
- img_ref: numpy array with shape (y, x)
Returns
numpy array with shape (t, y, x), corresponding to the cross correlation matrix
Function used to generate a rotational cross correlation matrix of an image against a reference image Cross correlation values are normalized by the minimum and maximum Pearson's correlation between the two images.
Parameters
- img_slice: numpy array with shape (y, x)
- img_ref: numpy array with shape (y, x)
Returns
numpy array with shape (360, y, x), corresponding to the rotational cross correlation matrix
Function used to generate a cross correlation matrix of an image against a reference image Cross correlation values are normalized by the minimum and maximum Pearson's correlation between the two polar images.
Parameters
- img_slice: numpy array with shape (y, x)
- img_ref: numpy array with shape (y, x)
Returns
numpy array with shape (y,x), corresponding to the cross correlation matrix
Function used to generate a cross correlation matrix of an image against a reference image where both are to be expressed in polar coordinates (theta,r) Cross correlation values are normalized by the minimum and maximum Pearson's correlation between the two polar images. Rotation in cartesian space will show as translation in the theta dimension.
Parameters
- img_slice: numpy array with shape (y, x)
- img_ref: numpy array with shape (y, x)
Returns
numpy array with shape (360,r), corresponding to the cross correlation matrix in polar coordinates
Function used to generate a cross correlation matrix of an image against a reference image where both are to be expressed in logpolar coordinates (theta, log(r)) Cross correlation values are normalized by the minimum and maximum Pearson's correlation between the two logpolar images. Rotation and scaling in cartesian space will show as translation in the theta and log(r) dimensions respectively.
Parameters
- img_slice: numpy array with shape (y, x)
- img_ref: numpy array with shape (y, x)
Returns
numpy array with shape (360,log(r)), corresponding to the cross correlation matrix in polar coordinates